<?php
namespace Common\Model;
use Think\Model;

/**
 * 模型基类
 * 
 */
class SiteConfigModel extends BaseModel
{
    /**
     * 获取站点配置
     * 
     * @param type $site_id
     * @return type
     */
    public function getSiteInfo($site_id)
    {
        $info = $this->where(array('site_id' => $site_id))->select();
        if (!$info) {
            return array();
        }
        $return = array();
        foreach ($info as $v) {
            $return[$v['name']] = $v['value'];
        }
        return $return;
    }
}
